import {observable,action} from "mobx-miniprogram"
import {getStorage,setStorage,clearStorage,removeStorage} from "../utils/storage"
export const userStore = observable({
	// 定义数据
	token:getStorage('token')||'',
	userInfo:getStorage('userInfo')||{},
	// 定义修改数据的方法
	setToken: action(function(token){
		this.token = token
	}),
	setUserInfo: action(function(info){
		this.userInfo = info
	})
})